<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SiteUTF8.master" Inherits="System.Web.Mvc.ViewPage<web_uchet.ViewModels.ViewЗаказ>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Детали заказа
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<% web_uchet.Security.ProgramContext MData = ViewData["Master"] as web_uchet.Security.ProgramContext;%>
<div id="dialog" title="Сообщение">
	<p>
		<span class="ui-icon ui-icon-circle-check" style="float:left; margin:0 7px 50px 0;"></span>
		<span  id="span-dialog"></span>
	</p>
</div>
<script type="text/javascript">
    jQuery.noConflict();
    jQuery(function() {
        jQuery("#dialog").dialog({
            autoOpen: false,
            bgiframe: true,
            modal: false,
            buttons: {
                Ok: function() {
                    jQuery(this).dialog('close');
                }
            }
        });
    });
	</script>
<div id="page-main-content">
    <%Html.RenderPartial("DetailsPartial", this.Model); %>
    <p>
    <%=Html.ActionLink("Назад к списку", "Index") %> | 
     <% if (MData.Roles.Contains(web_uchet.Enums.UserRoleEnum.Администратор))
        {%>
            
            <%=Html.ActionLink("Правка", "Edit", new { id = Model.ИД_Заказа })%> |        
            <%=Html.ActionLink("Удалить", "Delete", new { id = Model.ИД_Заказа })%> | 
            <%if (this.Model.Отменен != true && this.Model.Выполнено != true)
              { %>
              <%if (!this.Model.Отменен)
                { %>
            <a href="javascript:SetCancel(<%=Model.ИД_Заказа.ToString()%>);">Отмена</a> |
                <%}
                if (!this.Model.Выполнено)
                {%>
            <a href="javascript:SetExecuted(<%=Model.ИД_Заказа.ToString()%>);">Выполнен</a> |
                <%}
              }%> 
      <%} %>
    </p>
</div>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
    <link href="/Content/jquery-ui-1.7.2.custom.css" rel="stylesheet" type="text/css" />
    <script src="/Scripts/ui.core.js" type="text/javascript"></script>
    <script src="/Scripts/ui.dialog.js" type="text/javascript"></script>   
    <script src="/Scripts/OrderScripts.js" type="text/javascript"></script>
</asp:Content>

